<?php
/**
 * @version     3.0
 * @package     com_sinhvien
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      quyen <quyennguyen.soict@gmail.com> - http://
 */

// No direct access
defined('_JEXEC') or die;

/**
 * Sinhvien helper.
 */
class SinhvienHelper
{
	/**
	 * Configure the Linkbar.
	 */
	public static function addSubmenu($vName = '')
	{
		JHtmlSidebar::addEntry(
			JText::_('Thông tin sinh viên'),
			'index.php?option=com_sinhvien&view=sinhviens',
			$vName == 'sinhviens'
		);
                JHtmlSidebar::addEntry(
			JText::_('Thông tin học phần'),
			'index.php?option=com_sinhvien&view=hocphans',
			$vName == 'hocphans'
		);
                 JHtmlSidebar::addEntry(
			JText::_('Thông tin lớp học'),
			'index.php?option=com_sinhvien&view=lops',
			$vName == 'lops'
		);
                 JHtmlSidebar::addEntry(
			JText::_('Thông tin học kì'),
			'index.php?option=com_sinhvien&view=hockis',
			$vName == 'hockis'
		);
                  JHtmlSidebar::addEntry(
			JText::_('Thông tin giảng viên'),
			'index.php?option=com_sinhvien&view=giangviens',
			$vName == 'giangviens'
		);
                   JHtmlSidebar::addEntry(
			JText::_('Đăng kí lớp học'),
			'index.php?option=com_sinhvien&view=dangkilops',
			$vName == 'dangkilops'
		);

	}

	/**
	 * Gets a list of the actions that can be performed.
	 *
	 * @return	JObject
	 * @since	1.6
	 */
	public static function getActions()
	{
		$user	= JFactory::getUser();
		$result	= new JObject;

		$assetName = 'com_sinhvien';

		$actions = array(
			'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'
		);

		foreach ($actions as $action) {
			$result->set($action, $user->authorise($action, $assetName));
		}

		return $result;
	}
}
